<?php

namespace app\systems\model;
use think\Model;
use think\facade\Db;
class CommonExportCsvCreateInfoModel extends Model
{

    /**
     * 表名
     */
    public $table = 'qu_common_export_csv_create_info';


    public function getOneResultArray($condition){
           $list = Db::name('common_export_csv_create_info')
                   ->where($condition)
                   ->whereIn('status',[1,2])
                   ->find();
           return  $list;
    }



    public function getAllResultArray2($condition){
        $list = Db::name('common_export_csv_create_info')
            ->where($condition)
            ->select();
        return  objectToArray($list);
    }



    public function getRowResultArray($condition){
        $list = Db::name('common_export_csv_create_info')
            ->field('count(id) as num')
            ->where($condition)
            ->find();
        return  $list;
    }

}